package com.han.builder.demo1;

/**
 * @ClassName Director
 * @Description 指挥者类
 * @Author duoduo Han
 * @Date 2024/6/5 18:46
 */
public class Director {
    //声明builder类型的变量
    private Builder builder;
    public Director(Builder builder) {
        this.builder = builder;
    }
    //组装自行车的功能
    public Bike construct() {
        builder.buildFrame();
        builder.buildSeat();
        builder.buildWheel();
        return builder.createBike();
    }
}
